package com.csc.banking.domain;

import java.math.BigInteger;
import java.util.Collection;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="savingaccounts")
public class SavingAccount {
	@Id
	private BigInteger savingAccountId;
//	private BigInteger accountNumber;
	private Double balance;
	private String state;
	private Boolean isRepeatable;
	
	private Date createAccountDate;
	
	@OneToMany(mappedBy="savingaccounts")
	private Collection<SavingTransaction> savingtransactions;
	
	@ManyToOne
	@JoinColumn(name="accountNumber")
	private Account accounts;
	
	@OneToMany(mappedBy="savingaccounts")
	private Collection<SavingAccount_Interestrate> savingaccount_has_interstrate;
	
	
	public BigInteger getSavingAccountId() {
		return savingAccountId;
	}

	public void setSavingAccountId(BigInteger savingAccountId) {
		this.savingAccountId = savingAccountId;
	}

//	public BigInteger getAccountNumber() {
//		return accountNumber;
//	}
//
//	public void setAccountNumber(BigInteger accountNumber) {
//		this.accountNumber = accountNumber;
//	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public String getState() {
		return state;
	}

	public void setState(String statel) {
		this.state = statel;
	}

	public Boolean getIsRepeatable() {
		return isRepeatable;
	}

	public void setIsRepeatable(Boolean isRepeatable) {
		this.isRepeatable = isRepeatable;
	}

	public Date getCreateAccountDate() {
		return createAccountDate;
	}

	public void setCreateAccountDate(Date createAccountDate) {
		this.createAccountDate = createAccountDate;
	}

	public Collection<SavingTransaction> getSavingtransactions() {
		return savingtransactions;
	}

	public void setSavingtransactions(
			Collection<SavingTransaction> savingtransactions) {
		this.savingtransactions = savingtransactions;
	}

	public Account getAccounts() {
		return accounts;
	}

	public void setAccounts(Account accounts) {
		this.accounts = accounts;
	}

	public Collection<SavingAccount_Interestrate> getSavingaccount_has_interstrate() {
		return savingaccount_has_interstrate;
	}

	public void setSavingaccount_has_interstrate(
			Collection<SavingAccount_Interestrate> savingaccount_has_interstrate) {
		this.savingaccount_has_interstrate = savingaccount_has_interstrate;
	}

	

}
